<?php
/***************************9、将注册信息写入数据库***************************/
  $username = $_REQUEST['username'];
  $password = $_REQUEST['password'];
  $confire = $_REQUEST['confire'];

  /*第一个参数是服务器名
  第四个参数是数据库名*/
  $mysql = new mysqli(SAE_MYSQL_HOST_M.':'.SAE_MYSQL_PORT,SAE_MYSQL_USER,SAE_MYSQL_PASS,SAE_MYSQL_DB);
  // 处理乱码
  $mysql->query('set names utf8');
  if ($confire == $password) {
    $sql = "INSERT INTO  starrySkySQL (username,password) VALUES ('{$username}','{$password}')";
  }
  $result = $mysql->query($sql);
  if ($result) {
     echo '恭喜注册成功';
  }
  $mysql->close();
 ?>
